home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_gen / euphor14.zip / KEY.EX < prev    next >
Text File  |  1996-02-18  |  364b  |  17 lines

  1. -- find out what numeric key code is generated by any key on the keyboard
  2. -- usage:
  3. --          ex key
  4.  
  5. integer code
  6.  
  7. puts(1, "Press any key. I'll show you the key code. Press q to quit\n\n")
  8. while 1 do
  9.     code = get_key()
  10.     if code != -1 then
  11.     printf(1, "The key code is: %d\n", code)
  12.     if code = 'q' then
  13.         exit
  14.     end if
  15.     end if
  16. end while
  17.